package com.example.myworldcups.controller;

import com.example.myworldcups.model.WorldCupMatches;
import com.example.myworldcups.response.R;
import com.example.myworldcups.service.WorldCupMatchesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lenovo
 * @date 2023/1/3
 */
@AllArgsConstructor
@RestController
@RequestMapping("/api/query")
@Api(value = "/query", tags = "查询")
public class WorldCupMatchesController {

    @Resource
    private WorldCupMatchesService worldCupMatchesService;

    @GetMapping("/list/all")
    @ApiOperation(value = "查询所有")
    public R<List<WorldCupMatches>> listAll() {
        List<WorldCupMatches> categories = worldCupMatchesService.findAllOfBClass();
        return R.ok(categories);
    }


}
